package com.apache.portal.weixin.entity.send;

import org.jdom.Document;
import org.jdom.Element;

/**
  * description: 回复图片消息模型
  * @author Hou DaYu 创建时间：下午01:59:42
 */
public class WxSendPicMsg extends WxSendMsg {

	private String mediaId;//通过上传多媒体文件，得到的id

	public WxSendPicMsg(WxSendMsg msg, String mediaId) {
		super(msg);
		setMsgType("image");
		this.mediaId = mediaId;
	}

	public String getMediaId() {
		return mediaId;
	}

	public void setMediaId(String mediaId) {
		this.mediaId = mediaId;
	}

	@Override
	public Document toDocument() {
		Document doc = super.toDocument();
		Element root = doc.getRootElement();
		Element image = createElement(root, "Image", "");
		createElement(image, "MediaId", getMediaId());
		return doc;
	}
}
